package com.test.p01singleton.example04;

/**
 * 静态内部类
 * 优点，线程安全，效率高，可以延时加载
 */
public class Singleton04 {

    private Singleton04(){

    }
    private static class SingletonHold{
        private static final Singleton04 instance = new Singleton04();
    }

    public static Singleton04 getInstance(){
        return SingletonHold.instance;
    }

}
